package stringTest;

import java.util.regex.Matcher;
import java.util.regex.Pattern;


public class PatternTest {
	public void test(){

		String tempStr = "abcdefghijkl";
		Pattern ptn = Pattern.compile("\\s");
		Matcher matcher  = ptn.matcher(tempStr);
		
		//show matches
		while(matcher.find()) {
			System.out.printf("Found: \"%s\"  from %d to %d.%n",
					matcher.group(),matcher.start(),matcher.end());
		}
		
		
	}
}
